package pers.vic.base.pager;

import java.io.Serializable;

import pers.vic.base.contant.BaseConsoleConstant;

/**
 * 查询参数 默认带分页信息
 * @author VIC
 *
 */
public class Lookup implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int page = 1;
	
	private int size = BaseConsoleConstant.PAGE_SIZE;
	
	
	public Lookup() {
		
	}
	
	public Lookup(int page, int size) {
		this.page = page;
		this.size = size;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

    /**
     * 当前数据索引.
     * @return 数据索引
     */
    public int getIndex() {
        return (getPage() - 1) * getSize();
    }


	
	
}
